package uebungsblatt09.aufgabe15a;

import java.io.Serializable;

public class View implements ModelListener, Serializable
{
	private static final long serialVersionUID = -2554728737814365070L;

	private String z;
	private Model model;
	
	public View(){}
	
	public View(Model model, String z)
	{
		this.model = model;
		this.z = z;
	}
	
	public void modelChanged()
	{
		for(int i = 0; i<model.getW(); i++)
			System.out.print(z);
		System.out.println();
	}
	
	public void setModel(Model model)
	{
		this.model = model;
	}
	
	public Model getModel()
	{
		return model;
	}
	
	public void setZ(String z)
	{
		this.z = z;
	}
	
	public String getZ()
	{
		return z;
	}
}
